<style scoped src="./index.scss" lang="scss" rel="stylesheet/scss"></style>
<template src="./index.html"></template>
<script>
export default {
  mixins: [Vue.prototype.$vFN.Mixins.Base, Vue.prototype.$vFN.Mixins.Edit],
  components: {},
  data() {
    return {
      appWindow: window,
      form: {},

      load: true,
      showSelect: true,

      data: "",
    };
  },
  methods: {
    // 初始化
    async init() {
      // 初始化数据
      await this.mixinEdit_editBoxInit({
        model: "form",
        id: this.id,
      });

      let res = await this.$vFN.Http.post(
        {
          url: "admin/category/select",
        },
        window
      );
      this.form = res.data.list;
      this.load = false;
    },
    category(data) {
      this.data = data;
      this.showSelect = false;
      this.onSuccess(this.data);
    },
    // 成功回调
    onSuccess() {},
    // 取消回调
    onCancel() {},
    // 失败回调
    onError() {},
  },
  mounted() {
    this.init();
  },

  activated() {},
};
</script>